
import java.awt.Image;
import java.net.URL;
import javax.swing.ImageIcon;

public class ImageManager {

    public String NAMES[] = {"grass.png","Stone.png","Tree.png"};
    //<editor-fold defaultstate="collapsed" desc="Images">
    public Image[] IMAGES = new Image[Globals.NUM_IDS];//put Images here using getImage... **Note the images have to put in a folder called Images in the source file then compiled
    // </editor-fold>

    public Image getImage(String name) {
        URL u = this.getClass().getResource("/Images/" + name);
        ImageIcon g = new ImageIcon(u);
        Image newimg = g.getImage();
        return newimg;
    }

    public ImageManager() {
        for (int z = 0; z < Globals.NUM_IDS; z++) {
            IMAGES[z] = getImage(NAMES[z]);
        }
    }
}
